import Vue from 'vue'
import App from './App.vue'
import VueRouter from "vue-router";
import router from "@/router";
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import './assets/css/global.css'
import './assets/icons/iconfont.css'
import './assets/fonts/fonts.css'
import mixin from "@/mixin";
import Fragment from 'vue-fragment'
import * as api from '@/API/api'
import request from "@/API/request";
import {echarts, chinaMap, d3} from "@/echarts/index"
import 'echarts-wordcloud'
let cityData = {}
for (let city of chinaMap.features) {
    let cityName = city.properties.name
    let cityCode = city.properties.adcode
    let cityCoord = city.properties.center
    if (cityName && cityCode) {
        cityData[cityName] = {cityCode, cityCoord}
    }
}

Vue.prototype.$cityData = cityData
Vue.prototype.$d3 = d3
Vue.prototype.$echarts = echarts
Vue.prototype.$http = request
Vue.prototype.$api = api
Vue.use(VueRouter)
Vue.config.productionTip = false
Vue.use(ElementUI)
Vue.mixin(mixin)
Vue.use(Fragment.Plugin)

new Vue({
    render: h => h(App),
    router: router,
}).$mount('#app')

